I have three modules: Module A, Module B and Module C. There is a "specifies" relationship from B-->A and a "satisfies" relationship from C-->B. Some of the objects in Module A link to multiple objects in Module B, which link to multiple objects in Module C. However, sometimes, multiple objects in Module B link to the same object in Module C.
I used the Analysis Wizard in Module A, to generate 2 traceablility columns, one for Module B and another for Module C (recursive analysis to level 2). The problem is that the column for Module C will have duplicate entries of objects from Module C for a single object in Module A.
Is there any way to get rid of the duplicates in the traceability column for Module C?
I am not a DXL whiz, but do have a programming background.
Thanks,
Terry
TerryCox - Tue Jan 31 15:36:07 EST 2012 |
|
Re: Remove duplicates in traceability column generated by Analysis Wizard rain_bow - Tue Jan 31 15:39:15 EST 2012
Insert your dxl script for module c column. Someone may modify the code for you.
This would be easier than telling you how to change it.
|
|
Re: Remove duplicates in traceability column generated by Analysis Wizard TerryCox - Tue Jan 31 15:43:15 EST 2012
Here is the Layout DXL code for the traceability column:
// DXL generated by DOORS traceability wizard on 03 January 2012.
// Wizard version 2.0, DOORS version 9.3.0.3
pragma runLim, 0
int lines[2] = {0, 0}
void adjustLines(int depth, showAtDepth) {
int count
for (count = 0; count < 2; count++) {
while (linesdepth-1 < linescount) {
if (depth == showAtDepth) displayRich("\\pard " " ")
linesdepth-1++
}
}
}
void showIn(Object o, int depth) {
Link l
LinkRef lr
ModName_ otherMod = null
Module linkMod = null
ModuleVersion otherVersion = null
Object othero
string disp = null
string s = null
string plain, plainDisp
int plainTextLen
int count
bool doneOne = false
string linkModName = "*"
for lr in all(o<-linkModName) do {
otherMod = module (sourceVersion lr)
if (!null otherMod) {
if ((!isDeleted otherMod) && (null data(sourceVersion lr))) {
load((sourceVersion lr),false)
}
}
}
for l in all(o<-linkModName) do {
otherVersion = sourceVersion l
otherMod = module(otherVersion)
if (null otherMod || isDeleted otherMod) continue
othero = source l
if (null othero) {
load(otherVersion,false)
}
othero = source l
if (null othero) continue
if (isDeleted othero) continue
int oldLines = linesdepth-1
adjustLines(depth, 2)
bool kick = (doneOne) && (linesdepth-1 == oldLines)
if (kick) {
linesdepth-1++
if (depth == 2) displayRich("\\pard " " ")
}
if (depth < 2) {
showIn(othero, depth+1)
}
doneOne = true
if (depth == 2) {
s = (identifier othero)
if (s == "")
displayRich("\\pard " " ")
else
displayRich("\\pard " s)
s = probeRichAttr_(othero,"Object Text", true)
if (s == "")
displayRich("\\pard " " ")
else
displayRich("\\pard " s)
}
linesdepth-1 += 2
}
}
showIn(obj,1)
|
|
Re: Remove duplicates in traceability column generated by Analysis Wizard llandale - Tue Jan 31 16:54:02 EST 2012 TerryCox - Tue Jan 31 15:43:15 EST 2012
Here is the Layout DXL code for the traceability column:
// DXL generated by DOORS traceability wizard on 03 January 2012.
// Wizard version 2.0, DOORS version 9.3.0.3
pragma runLim, 0
int lines[2] = {0, 0}
void adjustLines(int depth, showAtDepth) {
int count
for (count = 0; count < 2; count++) {
while (linesdepth-1 < linescount) {
if (depth == showAtDepth) displayRich("\\pard " " ")
linesdepth-1++
}
}
}
void showIn(Object o, int depth) {
Link l
LinkRef lr
ModName_ otherMod = null
Module linkMod = null
ModuleVersion otherVersion = null
Object othero
string disp = null
string s = null
string plain, plainDisp
int plainTextLen
int count
bool doneOne = false
string linkModName = "*"
for lr in all(o<-linkModName) do {
otherMod = module (sourceVersion lr)
if (!null otherMod) {
if ((!isDeleted otherMod) && (null data(sourceVersion lr))) {
load((sourceVersion lr),false)
}
}
}
for l in all(o<-linkModName) do {
otherVersion = sourceVersion l
otherMod = module(otherVersion)
if (null otherMod || isDeleted otherMod) continue
othero = source l
if (null othero) {
load(otherVersion,false)
}
othero = source l
if (null othero) continue
if (isDeleted othero) continue
int oldLines = linesdepth-1
adjustLines(depth, 2)
bool kick = (doneOne) && (linesdepth-1 == oldLines)
if (kick) {
linesdepth-1++
if (depth == 2) displayRich("\\pard " " ")
}
if (depth < 2) {
showIn(othero, depth+1)
}
doneOne = true
if (depth == 2) {
s = (identifier othero)
if (s == "")
displayRich("\\pard " " ")
else
displayRich("\\pard " s)
s = probeRichAttr_(othero,"Object Text", true)
if (s == "")
displayRich("\\pard " " ")
else
displayRich("\\pard " s)
}
linesdepth-1 += 2
}
}
showIn(obj,1)
You need a global Skip list with 'Object' as the key. Done at the bottom where its DoneOne = true, you want to put othero into the Skip instead of displaying its information. If the Object is already in the skip then the put is ignored. After this code you need to plow through the Skip list, getting othero values, and display them then.
|
|